<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

		<div class="pageHeader">
			<form id="pagerForm" action="admin/module.action"
			onsubmit="return navTabSearch(this);">
				<input type="hidden" name="pageNum" value="1" /><!--【必须】value=1可以写死-->
			    <input type="hidden" name="numPerPage" value="20" /><!--【可选】每页显示多少条-->
					
				<div class="searchBar">
					<table class="searchContent" width="100%" border="0">
						<tr>
							<td height="42px" align="right">
								编号:<input type="text"
								class="textbox" name="sn" value="${form.sn}"
								size="15" maxlength="20" /> 
								
								名称:<input type="text"
								class="textbox" name="real_name" value="${form.name}"
								size="15" maxlength="20" /> 
								
								父模块:
								<select name="parentId">
									<option value="0">无</option>
									<s:iterator value="datas" var="data">
										<option ${parentId==data.id ? "selected":"" }  value="${data.id }">${data.name }</option>
										<s:iterator value="data.children" var="cm">
											<option ${ parentId==data.id ? "selected":"" } value="${cm.id }">----${cm.name }</option>
										</s:iterator>
									</s:iterator>
								</select>	 
								
							</td>
							<td align="left" width="40%">
								<ul class="subBar">
									<li><div class="buttonActive">
											<div class="buttonContent">
												<button type="submit">查询</button>
											</div>
										</div></li>
									<li><div class="buttonActive">
											<div class="buttonContent">
												<button type="submit">刷 新</button>
											</div>
										</div></li>
									
								</ul>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<div class="panelBar">
			<ul class="toolBar">
				<li class="">
					<a target="navTab" href="admin/module.action?parentId=${module.parent == null ? 0:module.parent.id }"
						ref="module_list" class="back" height="340"><span>返回</span>
					</a>
				</li>
				<li class="line">line</li>				
				<li class="">
				<a target="dialog" href="admin/module!input?parentId=${parentId }"
					ref="emp_add" class="add" height="340"><span>添加</span>
				</a>
				</li>
				<li><a title="确定要删除选中的模块和它们的子模块吗?" target="selectedTodo" rel="ids"
					href="admin/module!delete"  class="delete">
					<span>删除选中的项目</span>
				</a>
				</li>
				<li class="line">line</li>
				<li><a title="实要导出这些记录吗?" targettype="navTab"
					target="dwzExport" href="demo/common/dwz-team.xls" class="icon"><span>导出EXCEL</span>
				</a>
				</li>
			</ul>
		</div>
		
		<div class="gridScroller" style="  overflow: auto;">
			<TABLE class="table" layouth="120" width="100%" border=1 align="center">
				<thead>
					<TR height="24px">
						<Th><input type="checkbox" group="ids" /></Th>
						<Th>ID</Th>
						<Th>名称</Th>
						<Th>父模块</Th>
						<Th>编号</Th>
						<Th>类型</Th>
						<Th>地址</Th>
						<Th>目标</Th>
						<Th>排序</Th>
						<Th width="60">操作</Th>
					</TR>
				</thead>
				<TBODY>
					<s:iterator value="datas" var="data">
						<tr target="sid_user" ref="${data.id}">
							<td width="40px"><input type="checkbox" name="ids" value="${data.id}"/></td>
							<td>${data.id}</td>
							<td>
							<s:if test="#data.type=='分类' || #data.type==null">
								<a href="admin/module.action?parentId=${data.id }" target="navTab" rel="module_list">${data.name}</a>
							</s:if>
							<s:else>
								${data.name}
							</s:else>
							
							</td>
							<td>${data.parent.name}</td>
							<td>${data.sn}</td>
							<td>${data.type == null ? "分类":data.type}</td>
							<td>${data.url}</td>
							<td>${data.target}</td>
							<td>${data.level}</td>
							<td>
								<div>
									<a class="btnDel" href="admin/module!delete?ids=${data.id }" target="ajaxTodo" title="删除">删除</a>
									<a class="btnEdit" href="admin/module!input?method=update&id=${data.id }" target="navTab" rel="module_edit" title="编辑">编辑</a>
								</div>
							</td>
						</tr>
					</s:iterator>
					<s:if test="datas.size==0">
						<tr><td align="center" colspan="8">无记录
						</tr>
					</s:if>
			</TABLE>
		</div>
		<%@ include file="pager.jsp" %>
